package com.labichaoka.chaoka.net;

import android.content.Context;

import com.labichaoka.chaoka.entity.BankCardListResponse;
import com.labichaoka.chaoka.entity.BankInfoDtoResponse;
import com.labichaoka.chaoka.entity.BaseResponse;
import com.labichaoka.chaoka.entity.BindBankRequest;
import com.labichaoka.chaoka.entity.CreditCardResponse;
import com.labichaoka.chaoka.entity.FaceAuthRequest;
import com.labichaoka.chaoka.entity.FaceAuthResponse;
import com.labichaoka.chaoka.entity.FeedBackRequest;
import com.labichaoka.chaoka.entity.FetchMoneyRequest;
import com.labichaoka.chaoka.entity.FetchMoneyResponse;
import com.labichaoka.chaoka.entity.GetBankSmsRequest;
import com.labichaoka.chaoka.entity.GetDepositBalanceInfo;
import com.labichaoka.chaoka.entity.GetWithdrawInfo;
import com.labichaoka.chaoka.entity.GoWithdrawRequest;
import com.labichaoka.chaoka.entity.GoWithdrawResponse;
import com.labichaoka.chaoka.entity.HomeInitResponse;
import com.labichaoka.chaoka.entity.IDCardRequest;
import com.labichaoka.chaoka.entity.IDCardResponse;
import com.labichaoka.chaoka.entity.IsOpenAcountRequest;
import com.labichaoka.chaoka.entity.IsOpenAcountResponse;
import com.labichaoka.chaoka.entity.LimitStatusResponse;
import com.labichaoka.chaoka.entity.LoginRequest;
import com.labichaoka.chaoka.entity.LoginResponse;
import com.labichaoka.chaoka.entity.MessageListResponse;
import com.labichaoka.chaoka.entity.OrderListResponse;
import com.labichaoka.chaoka.entity.OverdueAndIdcardResponse;
import com.labichaoka.chaoka.entity.PersonInfoResponse;
import com.labichaoka.chaoka.entity.QueryIDCardBackResponse;
import com.labichaoka.chaoka.entity.RealInfoRequest;
import com.labichaoka.chaoka.entity.RealNameRequest;
import com.labichaoka.chaoka.entity.SaveInformationRequest;
import com.labichaoka.chaoka.entity.SendCodeRequest;
import com.labichaoka.chaoka.entity.SwitchCardResponse;
import com.labichaoka.chaoka.entity.UserInfoStatusResponse;
import com.labichaoka.chaoka.entity.VerifyInfoListResponse;
import com.labichaoka.chaoka.entity.VersionCheckResponse;
import com.labichaoka.chaoka.entity.WithdrawRecordInfoResponse;

import java.util.Map;

import rx.Observable;

/**
 * Created by admin on 2017/11/2.
 */

public class DataManager {
    private RetrofitService mRetrofitService;

    public DataManager(Context context) {
        this.mRetrofitService = RetrofitHelper.getInstance(context).getServer();
    }

    //检查更新
    public Observable<VersionCheckResponse> checkVersion(String versionId) {
        return mRetrofitService.checkVersion(versionId);
    }

    public Observable<BaseResponse> uploadContactList(Map<String, String> paramsMap) {
        return mRetrofitService.uploadContactList(paramsMap);
    }

    public Observable<HomeInitResponse> homeInit() {
        return mRetrofitService.init();
    }

    //获取验证码
    public Observable<BaseResponse> getSmsCode(SendCodeRequest request) {
        return mRetrofitService.getNotValiSend(request);
    }

    //登录
    public Observable<LoginResponse> login(LoginRequest request) {
        return mRetrofitService.login(request);
    }

    //退出登录
    public Observable<BaseResponse> logout() {
        return mRetrofitService.logout();
    }

    //获取逾期状态和实名认证状态
    public Observable<OverdueAndIdcardResponse> overdueAndIdcard() {
        return mRetrofitService.overdueAndIdcard();
    }

    //获取资料完善状态
    public Observable<UserInfoStatusResponse> getUserInfoStatus() {
        return mRetrofitService.getUserInfoStatus();
    }

    //根据类型上传文件
    public Observable<BaseResponse> uploadFile(IDCardRequest request) {
        return mRetrofitService.uploadFile(request);
    }

    //查询是否上传身份证正反面
    public Observable<QueryIDCardBackResponse> queryFback() {
        return mRetrofitService.queryFback();
    }

    //查询个人身份证信息
    public Observable<IDCardResponse> queryIDCard() {
        return mRetrofitService.queryIDCard();
    }

    //保存个人信息
    public Observable<BaseResponse> saveInformation(SaveInformationRequest request) {
        return mRetrofitService.saveInformation(request);
    }

    //修改真实姓名
    public Observable<BaseResponse> resetRealName(RealNameRequest request) {
        return mRetrofitService.resetRealName(request);
    }

    //获得orc识别结果
    public Observable<BaseResponse> getIDCardVerifyResult() {
        return mRetrofitService.getIDCardVerifyResult();
    }

    //重置身份证正反面上传
    public Observable<BaseResponse> resetCardId() {
        return mRetrofitService.resetCardId();
    }

    //获取绑定银行卡验证码
    public Observable<BaseResponse> getBankSms(GetBankSmsRequest request) {
        return mRetrofitService.getBankSms(request);
    }

    //绑定银行卡
    public Observable<BaseResponse> bindCard(GetBankSmsRequest request) {
        return mRetrofitService.bindCard(request);
    }

    //提交首次绑卡短信验证码接口
    public Observable<BaseResponse> bindCardVail(BindBankRequest request) {
        return mRetrofitService.bindCardVail(request);
    }

    //查询是否为种子用户
    public Observable<LoginResponse> queryIsSeed() {
        return mRetrofitService.queryIsSeed();
    }

    //获取银行卡列表
    public Observable<BankCardListResponse> getBankList() {
        return mRetrofitService.getBankList();
    }

    //获取个人信息
    public Observable<PersonInfoResponse> getPersonInfo() {
        return mRetrofitService.getPersonInfo();
    }

    //提交意见反馈
    public Observable<BaseResponse> commitFeedBack(FeedBackRequest request) {
        return mRetrofitService.commitFeedBack(request);
    }

    //获取额度及激活状态
    public Observable<LimitStatusResponse> limitActStatus() {
        return mRetrofitService.limitActStatus();
    }

    //预生成订单
    public Observable<FetchMoneyResponse> fetchMoney(FetchMoneyRequest request) {
        return mRetrofitService.fetchMoney(request);
    }

    //查询个人(公私)的消息内容
    public Observable<MessageListResponse> getMessageList() {
        return mRetrofitService.getMessageList();
    }

    //获取借款记录
    public Observable<OrderListResponse> getOrderList() {
        return mRetrofitService.getOrderList();
    }

    //获取支持银行卡列表
    public Observable<BankInfoDtoResponse> getBankCardList() {
        return mRetrofitService.getBankCardList();
    }

    //首次绑卡提交接口
    public Observable<BaseResponse> submitBankCardInfo(GetBankSmsRequest request) {
        return mRetrofitService.submitBankCardInfo(request);
    }

    //首次绑卡提交接口
    public Observable<BaseResponse> changeBankCard(GetBankSmsRequest request) {
        return mRetrofitService.changeBankCard(request);
    }

    //提交换绑卡银行卡接口
    public Observable<BaseResponse> submitVali(BindBankRequest request) {
        return mRetrofitService.submitVali(request);
    }

    //我的存管账户余额信息接口
    public Observable<GetDepositBalanceInfo> getDepositBalanceInfo() {
        return mRetrofitService.getDepositBalanceInfo();
    }

    //获取提现信息接口
    public Observable<GetWithdrawInfo> getWithdrawInfo() {
        return mRetrofitService.getWithdrawInfo();
    }

    //立即提现接口
    public Observable<GoWithdrawResponse> goWithdraw(GoWithdrawRequest request) {
        return mRetrofitService.goWithdraw(request);
    }

    //是否开户
    public Observable<IsOpenAcountResponse> isOpenAcount(IsOpenAcountRequest request) {
        return mRetrofitService.isOpenAcount(request);
    }

    //获取提现记录信息接口
    public Observable<WithdrawRecordInfoResponse> getWithdrawRecordInfo() {
        return mRetrofitService.getWithdrawRecordInfo();
    }

    //获取资料完善状态
    public Observable<VerifyInfoListResponse> getVerifyInfoList() {
        return mRetrofitService.getVerifyInfoList();
    }

    //提交实名认证
    public Observable<BaseResponse> submitRealNameAuth(RealInfoRequest request) {
        return mRetrofitService.submitRealNameAuth(request);
    }

    //清除所有认证信息接口
    public Observable<BaseResponse> clearAuthInfo() {
        return mRetrofitService.clearAuthInfo();
    }

    //埋点
    public Observable<BaseResponse> behavior(String actionNode) {
        return mRetrofitService.behavior(actionNode);
    }

    //活体认证
    public Observable<FaceAuthResponse> faceAuth(FaceAuthRequest request) {
        return mRetrofitService.faceAuth(request);
    }

    //获取活体验证结果接口
    public Observable<FaceAuthResponse> getFaceAuthStatus() {
        return mRetrofitService.getFaceAuthStatus();
    }

    //超卡换卡
    public Observable<SwitchCardResponse> scrdSwitchCard(GetBankSmsRequest request) {
        return mRetrofitService.scrdSwitchCard(request);
    }

    //超卡提交变更信息
    public Observable<SwitchCardResponse> submitSwitchCard(BindBankRequest request) {
        return mRetrofitService.submitSwitchCard(request);
    }

    //清除运营商
    public Observable<BaseResponse> resetUserStatus() {
        return mRetrofitService.resetUserStatus();
    }


    //信用卡是否展示开关
    public Observable<CreditCardResponse> creditCardSwitch() {
        return mRetrofitService.creditCardSwitch();
    }

}
